{% extends "base.html" %}

{% block content %}

<h2>{% block title %}Checkout 2/2{% endblock %}</h2>

<div class="order-display">

    {% include "order_status.html" %}
    {% with order.shipping_address as shipping_address %}
        {% with order.phonenumber as phonenumber %}
            {% include "order_shipping.html" %}
        {% endwith %}
    {% endwith %}
    {% include "order_details.html" %}

    <ul class="actions">
        <li>
            <form id="startpayment" action="{{ payment_url }}" method="post">
                {% csrf_token %}
                <div>
                    <input type="hidden" name="pid" value="{{ pid }}" />
                    <input type="hidden" name="sid" value="{{ sid }}" />
                    <input type="hidden" name="success_url" value="{{ success_url }}" />
                    <input type="hidden" name="cancel_url" value="{{ cancel_url }}" />
                    <input type="hidden" name="error_url" value="{{ error_url }}" />
                    <input type="hidden" name="checksum" value="{{ checksum }}" />
                    <input type="hidden" name="amount" value="{{ order.total_price }}" />
                    <button type="submit">Pay</button>
                </div>
            </form>
        </li>
        <li>
            <form method="get" action="{% url shop.views.checkout.cancel %}">
                <div><button type="submit">Cancel Order</button></div>
            </form>
        </li>
    </ul>
</div>

{% endblock %}
